/*    */ package system.staros.sblock1;
/*    */ 
/*    */ import java.util.ArrayList;
/*    */ import java.util.List;
/*    */ 
/*    */ public class FunctionCallNode extends Node
/*    */ {
/* 35 */   public static final List<Node> NO_ARGUMENTS = new ArrayList(0);
/*    */   private String functionName;
/*    */   private List<Node> arguments;
/*    */ 
/*    */   public FunctionCallNode(SourcePosition paramSourcePosition, String paramString, List<Node> paramList)
/*    */   {
/* 41 */     super(paramSourcePosition);
/* 42 */     this.functionName = paramString;
/* 43 */     this.arguments = paramList;
/*    */   }
/*    */ 
/*    */   public ZemObject eval(Interpreter paramInterpreter)
/*    */   {
/* 48 */     paramInterpreter.checkFunctionExists(this.functionName, getPosition());
/*    */ 
/* 50 */     ArrayList localArrayList = new ArrayList(this.arguments.size());
/* 51 */     for (Node localNode : this.arguments) {
/* 52 */       localArrayList.add(localNode.eval(paramInterpreter));
/*    */     }
/* 54 */     return paramInterpreter.callFunction(this.functionName, localArrayList, getPosition());
/*    */   }
/*    */ 
/*    */   public String toString()
/*    */   {
/* 59 */     StringBuilder localStringBuilder = new StringBuilder();
/* 60 */     localStringBuilder.append('(');
/* 61 */     localStringBuilder.append(this.functionName);
/* 62 */     for (Node localNode : this.arguments) {
/* 63 */       localStringBuilder.append(' ');
/* 64 */       localStringBuilder.append(localNode);
/*    */     }
/* 66 */     localStringBuilder.append(')');
/* 67 */     return localStringBuilder.toString();
/*    */   }
/*    */ }

/* Location:           D:\Марк\!IMPORTANT\staros\archive\version-2.260.zip
 * Qualified Name:     system.staros.sblock1.FunctionCallNode
 * JD-Core Version:    0.6.1
 */